package com.cq.hd.common.enums.biz;

import lombok.Getter;

/**
 * @description: 汇付图片类型：F07-营业执照，F03-法人身份证国徽面，F02-法人身份证人像面，F08-开户许可证，F13-结算卡/银行卡正面，
 * F56-结算人/持卡人身份证国徽面，F55-结算人/持卡人身份证人像面，F22-线下经营-门头照，F24-线下经营-内景照，F105-线下经营-收银台，F15-授权委托书，F301-增值电信业务经营许可证
 * @author: mYunYu
 * @date: 2021/8/23 14:28
 * @version: v1.0
 */
public enum HfFileTypeEnum {

    LICENSE_PIC("F07", "营业执照"),
    LEGAL_CERT_BACK_PIC("F03", "法人身份证国徽面"),
    LEGAL_CERT_FRONT_PIC("F02", "法人身份证人像面"),
    REG_ACCT_PIC("F08", "开户许可证"),
    SETTLE_CARD_FRONT_PIC("F13", "结算卡/银行卡正面"),
    SETTLE_CERT_BACK_PIC("F56", "结算人/持卡人身份证国徽面"),
    SETTLE_CERT_FRONT_PIC("F55", "结算人/持卡人身份证人像面"),
    STORE_HEADER_PIC("F22", "线下经营-门头照"),
    STORE_INDOOR_PIC("F24", "线下经营-内景照"),
    STORE_CASHIER_DESK_PIC("F105", "线下经营-收银台"),
    ZZDXYWJYXKKZ("F301", "增值电信业务经营许可证"),
    XY_PTYHKHXY("F346", "协议-平台用户开户协议"),
    XY_GYSXY("F353", "协议-供应商协议"),
    PZ_FHJL("F364", "凭证-发货记录/物流凭证"),

    AUTH_ENTURST_PIC_AUTH_PIC("F15", "授权委托书"),
    XCX_MJ_SY("F488", "运营媒介(小程序场景)-首页"),
    XCX_MJ_SPMX("F489", "运营媒介(小程序场景)-服务/商品明细页面"),
    XCX_MJ_XD("F490", "运营媒介(小程序场景)-下单场景页面"),
    XCX_MJ_ZF("F491", "运营媒介(小程序场景)-支付页面"),
    XCX_MJ_SQ("F492", "运营媒介(小程序场景)-授权或开发证明材料"),

    JYLS("F447", "交易双方历史合作项目流水证明"),
    QTJY("F453", "其他交易双方合作协议"),

    FR_GAT_TXZ_ZM("F31", "法人港澳台通行证正面"),
    WG_HZ_ZM("F506", "外国护照正面"),
    WGR_JLZ("F511", "外国人居留证"),
    GAT_JZZ("F512", "港澳台居住证"),
    ;


    @Getter
    private final String value;

    @Getter
    private final String name;

    HfFileTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public static HfFileTypeEnum typeOfValue(String value) {
        HfFileTypeEnum[] values = HfFileTypeEnum.values();
        for (HfFileTypeEnum v : values) {
            if (v.value.equals(value)) {
                return v;
            }
        }
        return null;
    }

    public static HfFileTypeEnum typeOfName(String name) {
        HfFileTypeEnum[] values = HfFileTypeEnum.values();
        for (HfFileTypeEnum v : values) {
            if (v.name.equals(name)) {
                return v;
            }
        }
        return null;
    }

}
